package com.sls.web.manager.sys.service;

import java.util.List;

import com.sls.web.manager.page.Pagination;
import com.sls.web.manager.pojo.UserInfoVO;
import com.sls.web.manager.sys.pojo.Permission;
import com.sls.web.manager.sys.querybean.PermissionQuery;

public interface PermissionService {
	/**
	 * 添加菜单
	 * 
	 * @param permission
	 * @param userinfo
	 * @return
	 * @throws Exception
	 */
	public boolean add(Permission permission, UserInfoVO userInfoVO)
			throws Exception;
	/**
	 * 更新菜单
	 * 
	 * @param permission
	 * @param userinfo
	 * @return
	 * @throws Exception
	 */
	public boolean update(Permission permission, UserInfoVO userInfoVO)
			throws Exception;
	/**
	 * 删除菜单
	 * 
	 * @param permission
	 * @param userinfo
	 * @return
	 * @throws Exception
	 */
	public void delete(String serviceCode, UserInfoVO userInfoVO);

	public List<Permission> queryAllInfo(UserInfoVO userInfoVO)
			throws Exception;
	/**
	 * 根据code查询菜单
	 * 
	 * @param permission
	 * @param userinfo
	 * @return
	 * @throws Exception
	 */
	public Permission queryInfoByServiceCode(String serviceCode,
			UserInfoVO userInfoVO) throws Exception;

	/**
	 * 根据条件查询
	 * 
	 * @param pQuery
	 * @param userInfoVO
	 * @return
	 * @throws Exception
	 */
	public Pagination<?> queryPermission(PermissionQuery pQuery,
			UserInfoVO userInfoVO) throws Exception;
}
